<html>
<head><meta charset="utf-8"><title>Using weak! in fs::hard_link · t-libs · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/index.html">t-libs</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html">Using weak! in fs::hard_link</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="241347654"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241347654" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241347654">(Jun 03 2021 at 04:36)</a>:</h4>
<p>Hello! I've been working on a libs-impl issue from GitHub, and I was wondering whether someone could check if I'm using the right approach. I feel a bit weird about messaging here, and I sincerely apologize if this isn't the right place.</p>
<p>The issue is here: <a href="https://github.com/rust-lang/rust/issues/80804">https://github.com/rust-lang/rust/issues/80804</a></p>
<p><code>fs::hard_link</code> uses a system call to create a hard link. On systems where it is available, it is preferable to use the <code>linkat</code> call, because it can be told not to follow symbolic links. However, it isn't available on all systems; currently, for VxWorks, Redox, and Android, the code uses the <code>link</code> call instead.  On other systems, it assumes the <code>link</code> call is present and calls that. The problem is that on older MacOS systems (specifically, 10.9) the <code>linkat</code> call isn't available, which generates an error when we try to use it.</p>
<p>What I've done to fix it is to split the systems into three categories. VxWorks and Redox are still assumed to not have <code>linkat</code>. Android and MacOS, systems that have <code>linkat</code> on more recent versions, use <code>weak!</code> to check at runtime. For other systems, <code>linkat</code> is still assumed to be available. I could instead just always check at runtime, but I figure there's probably some performance penalty to doing it that way.</p>
<p>I apologize if this explanation is unclear; I can post either a diff or the new version of the code if needed, and the issue has more information. That said, I wanted someone's take: am I going about this the right way?</p>



<a name="241348397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241348397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241348397">(Jun 03 2021 at 04:55)</a>:</h4>
<p>For Android specifically, you could probably just use a raw syscall for linkat, it was added to the Linux kernel in 2.6.16</p>



<a name="241348568"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241348568" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241348568">(Jun 03 2021 at 04:58)</a>:</h4>
<p>that's old enough you might be able to use the syscall unconditionally, icr the minimum version required by rust on Android</p>



<a name="241349027"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241349027" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241349027">(Jun 03 2021 at 05:08)</a>:</h4>
<p>I'm mildly nervous about doing something that might break Android builds in a PR intended to fix MacOS builds. That said, it also doesn't look like there's any way that any android version Rust supports would lack <code>linkat</code>.  The oldest version Rust support seems to support is Gingerbread, which ran the kernel version 2.6.35; even Cupcake used 2.6.27. So yeah, it looks like it should be fine to remove.</p>



<a name="241349415"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241349415" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241349415">(Jun 03 2021 at 05:17)</a>:</h4>
<p>note that there's a difference between the <code>linkat</code> function being in libc and the Linux kernel supporting <code>linkat</code></p>



<a name="241349652"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241349652" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241349652">(Jun 03 2021 at 05:22)</a>:</h4>
<p>There is?</p>



<a name="241349668"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241349668" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241349668">(Jun 03 2021 at 05:22)</a>:</h4>
<p>How would I be that it's in libc on the oldest version we support then?</p>



<a name="241350219"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241350219" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241350219">(Jun 03 2021 at 05:35)</a>:</h4>
<p>Nvm, I think I figured out how.</p>



<a name="241350572"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241350572" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241350572">(Jun 03 2021 at 05:42)</a>:</h4>
<p>Nope.</p>



<a name="241350582"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241350582" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241350582">(Jun 03 2021 at 05:42)</a>:</h4>
<p>It was added to bionic's libc in API level 21.</p>



<a name="241350591"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241350591" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241350591">(Jun 03 2021 at 05:43)</a>:</h4>
<p>Rust supports back to API level 9.</p>



<a name="241350746"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241350746" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241350746">(Jun 03 2021 at 05:46)</a>:</h4>
<p>Does anyone have any other comments on my approach?</p>



<a name="241353262"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241353262" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241353262">(Jun 03 2021 at 06:39)</a>:</h4>
<p>Alright, I'm going to submit a pull request. Thanks a ton for all the help. <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<a name="241354543"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241354543" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241354543">(Jun 03 2021 at 07:02)</a>:</h4>
<p>I was suggesting something like <code>syscall(SYS_linkat, olddirfd, oldpath, newdirfd, newpath, flags)</code></p>



<a name="241356663"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241356663" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241356663">(Jun 03 2021 at 07:30)</a>:</h4>
<p>I'm afraid I'm confused. What does this mean? Should I add it to my PR?</p>



<a name="241356703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241356703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241356703">(Jun 03 2021 at 07:31)</a>:</h4>
<p>This is my first time doing anything systems programming related, and also my first time working on Rust.</p>



<a name="241357139"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241357139" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241357139">(Jun 03 2021 at 07:36)</a>:</h4>
<p>I'm sorry.</p>



<a name="241359458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241359458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241359458">(Jun 03 2021 at 08:05)</a>:</h4>
<p>the <code>syscall</code> function from <code>libc</code> allows you to make any syscall by passing in the syscall number (the <code>SYS_*</code> constant), followed by the arguments to the actual syscall (with some arch-specific adjustments for passing 64-bit values): <a href="https://manpages.debian.org/buster/manpages-dev/syscall.2.en.html">https://manpages.debian.org/buster/manpages-dev/syscall.2.en.html</a></p>



<a name="241360433"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241360433" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241360433">(Jun 03 2021 at 08:16)</a>:</h4>
<p>so, assuming I didn't make any mistakes, you should be able to call <code>linkat_wrapper</code> instead of <code>linkat</code>:<br>
<a href="https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=433f69dbbe5b9d9d2105521226b44ce5">https://play.rust-lang.org/?version=stable&amp;mode=debug&amp;edition=2018&amp;gist=433f69dbbe5b9d9d2105521226b44ce5</a><br>
you'll definitely need to get someone to double check that I did it right though</p>



<a name="241360658"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241360658" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241360658">(Jun 03 2021 at 08:19)</a>:</h4>
<p>that should work even on very old versions of Android</p>



<a name="241364845"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241364845" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241364845">(Jun 03 2021 at 09:07)</a>:</h4>
<p>I see!</p>



<a name="241364986"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241364986" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241364986">(Jun 03 2021 at 09:09)</a>:</h4>
<p>What's the advantage of that over <code>weak!</code>?</p>



<a name="241365822"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241365822" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241365822">(Jun 03 2021 at 09:17)</a>:</h4>
<p>you can use the <code>linkat</code> syscall even if the systems' libc isn't new enough to support it  yet</p>



<a name="241365932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241365932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241365932">(Jun 03 2021 at 09:18)</a>:</h4>
<p>with <code>weak!</code> you have to fall-back to using <code>link</code></p>



<a name="241366008"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241366008" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241366008">(Jun 03 2021 at 09:19)</a>:</h4>
<p>I wonder if I should revert to always using <code>link</code> on android. It has the correct behavior anyway, it's just a bit awkward to say "well, this isn't the right way to do it, but it has the right end result on this platform so it's fine".</p>



<a name="241369558"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241369558" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jacob Lifshay <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241369558">(Jun 03 2021 at 09:57)</a>:</h4>
<p>reverting to <code>link</code> on android sounds good to me!</p>



<a name="241369596"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241369596" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241369596">(Jun 03 2021 at 09:57)</a>:</h4>
<p>we have a <code>syscall!()</code> macro that calls <code>syscall(SYS_*)</code> if weak!() doesn't work</p>



<a name="241369681"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241369681" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241369681">(Jun 03 2021 at 09:58)</a>:</h4>
<p>see library/std/src/sys/unix/weak.rs</p>



<a name="241449388"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241449388" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241449388">(Jun 03 2021 at 20:39)</a>:</h4>
<blockquote>
<p>I feel a bit weird about messaging here, and I sincerely apologize if this isn't the right place.</p>
</blockquote>
<p><span class="user-mention" data-user-id="417924">@Aris</span> fwiw this is definitely the right place for this sort of question :)</p>



<a name="241450309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241450309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241450309">(Jun 03 2021 at 20:47)</a>:</h4>
<p><span class="user-mention" data-user-id="417924">@Aris</span> I do think that <code>syscall!</code> would be the right answer here: use it from the library if available, otherwise make the syscall directly, and that way there's no need to ever call <code>link</code>.</p>



<a name="241452078"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241452078" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241452078">(Jun 03 2021 at 20:57)</a>:</h4>
<p><span class="user-mention silent" data-user-id="220273">Jane Lusby</span> <a href="#narrow/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link/near/241449388">said</a>:</p>
<blockquote>
<blockquote>
<p>I feel a bit weird about messaging here, and I sincerely apologize if this isn't the right place.</p>
</blockquote>
<p><span class="user-mention silent" data-user-id="417924">Aris</span> fwiw this is definitely the right place for this sort of question :)</p>
</blockquote>
<p>Thanks. That's really reassuring. When I looked at the channel, I was kind of scared because it seemed to be used for a bunch of advanced coordination well above my paygrade afkskfsk</p>



<a name="241453204"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241453204" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241453204">(Jun 03 2021 at 21:02)</a>:</h4>
<p><span class="user-mention silent" data-user-id="239881">Josh Triplett</span> <a href="#narrow/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link/near/241450309">said</a>:</p>
<blockquote>
<p><span class="user-mention silent" data-user-id="417924">Aris</span> I do think that <code>syscall!</code> would be the right answer here: use it from the library if available, otherwise make the syscall directly, and that way there's no need to ever call <code>link</code>.</p>
</blockquote>
<p>I'm kind of hesistant for a few reasons. This would mean special-casing Android, adding a new part of the <code>cfg_if!</code> just for it. I'd be doing that despite the fact that the current way of doing it, just using <code>link</code>, is working fine for Android. The other problem is that I've just pinged my reviewer and told them that the PR is ready for review again, before I saw this. I'm kind of worried I'll annoy them if I keep making changes to it. Maybe I'm worrying too much about that though.</p>



<a name="241453718"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241453718" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241453718">(Jun 03 2021 at 21:05)</a>:</h4>
<blockquote>
<p>I was kind of scared because it seemed to be used for a bunch of advanced coordination well above my paygrade afkskfsk</p>
</blockquote>
<p>hehe, very relatable, but yea the libs team zulip stream is definitely for answering questions from contributors working on T-libs PRs as well as for coordination between teams</p>



<a name="241453757"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/241453757" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#241453757">(Jun 03 2021 at 21:05)</a>:</h4>
<p>we just get more of the latter</p>



<a name="242654068"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242654068" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242654068">(Jun 14 2021 at 20:21)</a>:</h4>
<blockquote>
<p>I'm kind of worried I'll annoy them if I keep making changes to it. Maybe I'm worrying too much about that though.</p>
</blockquote>
<p>another thing to absolutely not be worried about, though I very much appreciate the care for maintainers this implies.</p>



<a name="242654620"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242654620" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242654620">(Jun 14 2021 at 20:25)</a>:</h4>
<p><span class="user-mention" data-user-id="417924">@inquisitivecrystal</span> I just reviewed the PR / backlog of comments</p>



<a name="242654957"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242654957" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242654957">(Jun 14 2021 at 20:28)</a>:</h4>
<p>my current question is, does the <code>syscall!</code> version that mara and josh have suggested work on the older versions of MacOS that are having linker errors?</p>



<a name="242655021"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242655021" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242655021">(Jun 14 2021 at 20:28)</a>:</h4>
<p>and clarification question to make sure I understand the current state of things:</p>



<a name="242655167"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242655167" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242655167">(Jun 14 2021 at 20:30)</a>:</h4>
<p><span class="user-mention" data-user-id="239881">@Josh Triplett</span> your suggestion is that they use <code>weak!</code> and <code>linkat</code>and then use <code>syscall!</code> instead of <code>link</code>as the fallback?</p>



<a name="242655347"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242655347" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242655347">(Jun 14 2021 at 20:32)</a>:</h4>
<p>Yes. Use <code>linkat</code> if the symbol exists, use <code>syscall!</code> to call the <code>linkat</code> syscall as the fallback, never call <code>link</code>.</p>



<a name="242657141"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242657141" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242657141">(Jun 14 2021 at 20:48)</a>:</h4>
<p>(note that syscall!() already tries weak!() first)</p>



<a name="242658254"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242658254" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242658254">(Jun 14 2021 at 20:58)</a>:</h4>
<p>so only use <code>syscall!</code> then</p>



<a name="242658287"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242658287" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242658287">(Jun 14 2021 at 20:58)</a>:</h4>
<p>which already does the fallback internally</p>



<a name="242663110"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242663110" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242663110">(Jun 14 2021 at 21:44)</a>:</h4>
<p>I'm a bit confused here.</p>



<a name="242663134"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242663134" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242663134">(Jun 14 2021 at 21:44)</a>:</h4>
<p>I'm happy to set it up in whatever way y'all would prefer.</p>



<a name="242663278"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242663278" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242663278">(Jun 14 2021 at 21:46)</a>:</h4>
<p>My understanding though is that <code>syscall!</code> would <em>not</em> work on the versions of macos that lack this symbol.</p>



<a name="242663421"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242663421" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242663421">(Jun 14 2021 at 21:48)</a>:</h4>
<p>The <a href="https://github.com/rust-lang/rust/blob/673d0db5e393e9c64897005b470bfeb6d5aec61b/library/std/src/sys/unix/weak.rs#L104">syscall implementation that applies on macos</a> seems not to have any fallback; it just logs an error if the symbol isn't present.</p>



<a name="242663863"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242663863" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242663863">(Jun 14 2021 at 21:52)</a>:</h4>
<p>The situation where we could use <code>syscall!</code> is for android. The <a href="https://github.com/rust-lang/rust/blob/673d0db5e393e9c64897005b470bfeb6d5aec61b/library/std/src/sys/unix/weak.rs#L122">syscall implementation that applies to Android</a> does do a fallback if the symbol isn't present, so I could do it in that case. The reason I'm hesitant is that the Android version already works fine no matter what (it isn't a problem to use <code>link</code> on Android, since it already has the desired behavior). If you want me to change Android to use <code>syscall!</code> instead of <code>link</code>, I can do that though.</p>



<a name="242663899"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242663899" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242663899">(Jun 14 2021 at 21:53)</a>:</h4>
<p>I don't think <code>syscall!</code> will work for macos though?</p>



<a name="242664146"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242664146" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242664146">(Jun 14 2021 at 21:56)</a>:</h4>
<p>oh. yeah, for macos, the <code>libc</code> crate doesn't expose any SYS_ constants it seems. (it does have a <code>syscall(..)</code> function though).</p>



<a name="242664193"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242664193" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Mara <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242664193">(Jun 14 2021 at 21:57)</a>:</h4>
<p>so yeah, for non-linux, syscall!() is pretty much identical to weak!() right now. :(</p>



<a name="242664361"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242664361" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242664361">(Jun 14 2021 at 21:59)</a>:</h4>
<p>It's slightly worse, because it makes it harder to handle the error case. :/</p>



<a name="242665029"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242665029" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242665029">(Jun 14 2021 at 22:07)</a>:</h4>
<p>is there any particular reason we should be avoiding the <code>link</code> call as a fallback?</p>



<a name="242665298"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242665298" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242665298">(Jun 14 2021 at 22:10)</a>:</h4>
<p>Not on Android: there, the two are basically identical. On macos, it follows symlinks, which is unfortunate because we've tried to standardize on not following symlinks where possible. But there's no way to get that behavior on old macos, so following them is the least bad way to handle the situation.</p>



<a name="242665535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/242665535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#242665535">(Jun 14 2021 at 22:12)</a>:</h4>
<p>There's also the issue of what to do about tests. On old macos, the tests will fail after this PR. I could make macos skip the relevant test? But also, currently it won't even build, so the test failing is kind of an upgrade. I wish there was a way to skip it <em>only</em> on the macos versions that had this problem, but I don't think there is.</p>



<a name="243479531"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/243479531" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#243479531">(Jun 22 2021 at 07:17)</a>:</h4>
<p>Do you have any thoughts on how to proceed on this?</p>



<a name="243479535"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/243479535" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#243479535">(Jun 22 2021 at 07:17)</a>:</h4>
<p>I'm sorry to nag.</p>



<a name="243534452"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/243534452" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#243534452">(Jun 22 2021 at 15:32)</a>:</h4>
<p>you don't need to apologize, it's ok to resume unresolved conversations occasionally, it's in the nature of synchronous chat channels to quickly move on. :) it's also possible that the other participants here don't have anything to add at this time. perhaps you could leave a comment in <a href="https://github.com/rust-lang/rust/issues/85953">#85953</a> briefly summarizing the current state and laying out the unresolved questions?</p>



<a name="243567526"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/243567526" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#243567526">(Jun 22 2021 at 19:31)</a>:</h4>
<p>I agree with <span class="user-mention" data-user-id="256342">@bstrie</span>, right now its a little hard to know the way forward, because as far as I can tell all the options we have leave something broken somewhere</p>



<a name="243567638"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/243567638" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#243567638">(Jun 22 2021 at 19:32)</a>:</h4>
<p>so knowing the options available and the exact tradeoffs we're weighing is probably the best way forward</p>



<a name="243605855"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/243605855" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#243605855">(Jun 23 2021 at 04:25)</a>:</h4>
<p>I'm more than happy to prepare something like that!</p>



<a name="244113408"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244113408" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244113408">(Jun 28 2021 at 08:09)</a>:</h4>
<p>I just posted <a href="https://github.com/rust-lang/rust/pull/85953#issuecomment-869467142">a status report</a>. It's not as clear as I'd like it to be, but hopefully it'll get the job done. Let me know if there's anything I need to explain further!</p>



<a name="244769236"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244769236" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244769236">(Jul 02 2021 at 23:57)</a>:</h4>
<p>Hi! So, uhh... I'm trying to figure out how to import the <code>weak!</code> macro to use it in the test (over in <code>library/std/src/fs/tests.rs</code>). I cannot for the life of me figure out how to make that happen. It seems I don't really understand the principles underlying <code>#[macro_use]</code>.</p>



<a name="244973647"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244973647" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244973647">(Jul 05 2021 at 20:56)</a>:</h4>
<p>Okay, I figured it out. Exactly how bad is it if I end up reordering module declarations in <code>std/src/lib.rs</code> so that I can use a macro from one module in the tests for another?</p>



<a name="244973803"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244973803" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244973803">(Jul 05 2021 at 20:58)</a>:</h4>
<p>bleh, does declaration order matter for macros? is that also true if you use macros 2.0, which doesn't require macro_use?</p>



<a name="244973936"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244973936" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244973936">(Jul 05 2021 at 21:00)</a>:</h4>
<p>It does. I don't know how how anyone thought this was a good idea, but it must have seemed sensible at the time.</p>



<a name="244973939"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244973939" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244973939">(Jul 05 2021 at 21:00)</a>:</h4>
<p>Uhh, actually, I could try that.</p>



<a name="244973973"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244973973" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244973973">(Jul 05 2021 at 21:00)</a>:</h4>
<p>MBE 2.0 is available to std?</p>



<a name="244974149"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244974149" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244974149">(Jul 05 2021 at 21:03)</a>:</h4>
<p>yep, std can use macros 2.0, and is even using them for some public macros in stable releases (<a href="https://doc.rust-lang.org/src/core/ptr/mod.rs.html#1526-1528">https://doc.rust-lang.org/src/core/ptr/mod.rs.html#1526-1528</a>). And this isn't even a public item (right?), so there shouldn't be any worry about API stability</p>



<a name="244974226"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244974226" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244974226">(Jul 05 2021 at 21:04)</a>:</h4>
<p>Yeah, this macro is purely internal.</p>



<a name="244974247"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244974247" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244974247">(Jul 05 2021 at 21:05)</a>:</h4>
<p>I think this is going to work.</p>



<a name="244974269"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244974269" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244974269">(Jul 05 2021 at 21:05)</a>:</h4>
<p>let me know if it does, I'm eager to understand any existing limitations of macros 2.0</p>



<a name="244974369"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244974369" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244974369">(Jul 05 2021 at 21:07)</a>:</h4>
<p>It's not exactly on topic, but if you have the time to answer, what's blocking macros 2.0? What I got from the tracking issue was that there's some design work that still needs to be done that isn't getting done?</p>



<a name="244974599"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244974599" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244974599">(Jul 05 2021 at 21:10)</a>:</h4>
<p>If you don't have time, I totally understand. :)</p>



<a name="244974619"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244974619" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244974619">(Jul 05 2021 at 21:11)</a>:</h4>
<p>I'm not the best person to ask, but IIRC there are unresolved questions about how control over hygiene should be presented to the user. right now I'm trying to make progress by getting the compiler to dogfood macros 2.0, but reviews take time :P <a href="https://github.com/rust-lang/rust/pull/85690">https://github.com/rust-lang/rust/pull/85690</a></p>



<a name="244974691"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244974691" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244974691">(Jul 05 2021 at 21:12)</a>:</h4>
<p>Thanks!</p>



<a name="244974724"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/244974724" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> bstrie <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#244974724">(Jul 05 2021 at 21:12)</a>:</h4>
<p>so it's safe to use the feature, just understand that for now you might need to add an attribute to the macro definition if you find that its hygiene is too restrictive for your use case (macros 2.0 has stricter hygiene by default than macros 1.0)</p>



<a name="245230309"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245230309" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245230309">(Jul 07 2021 at 19:27)</a>:</h4>
<p>Hey, sorry to bother y'all. <a href="https://github.com/rust-lang/rust/issues/85953">#85953</a> was just <code>r+</code>ed, which is great. I was kind of hoping to clean up the commit history before it got actually merged. I don't want to hold it up any further though...</p>



<a name="245230439"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245230439" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245230439">(Jul 07 2021 at 19:28)</a>:</h4>
<p>Would someone be willing to do a quick <code>r+</code> again after I run an interactive rebase? If not, I can just leave it.</p>



<a name="245231579"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245231579" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245231579">(Jul 07 2021 at 19:37)</a>:</h4>
<p>can do</p>



<a name="245232726"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245232726" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245232726">(Jul 07 2021 at 19:46)</a>:</h4>
<p>If possible please rebase on the same base commit, that should leave the github force-push view empty, makes it easier to review the delta.</p>



<a name="245232875"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245232875" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245232875">(Jul 07 2021 at 19:47)</a>:</h4>
<p>Same base commit?</p>



<a name="245232943"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245232943" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245232943">(Jul 07 2021 at 19:48)</a>:</h4>
<p>As in, leave the commit before the first one I did the same? Or leave the first one I did the same?</p>



<a name="245232970"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245232970" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245232970">(Jul 07 2021 at 19:48)</a>:</h4>
<blockquote>
<p>As in, leave the commit before the first one I did the same? </p>
</blockquote>
<p>That.</p>



<a name="245233464"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245233464" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245233464">(Jul 07 2021 at 19:52)</a>:</h4>
<p>Sure thing!</p>



<a name="245234765"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245234765" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245234765">(Jul 07 2021 at 20:02)</a>:</h4>
<p><span class="user-mention" data-user-id="417924">@inquisitivecrystal</span> Sorry, I <em>did</em> see that note but forgot about it when I went to r+.</p>



<a name="245236872"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245236872" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245236872">(Jul 07 2021 at 20:20)</a>:</h4>
<p>It happens to all of us!</p>



<a name="245237037"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245237037" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245237037">(Jul 07 2021 at 20:22)</a>:</h4>
<p>I have completed my commit cleanup. Thank you for giving me the chance to fix that. It was really bothering me.</p>



<a name="245237142"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245237142" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245237142">(Jul 07 2021 at 20:23)</a>:</h4>
<p>Thanks <span class="user-mention" data-user-id="330154">@The 8472</span>! I really appreciate the help!</p>



<a name="245237498"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245237498" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245237498">(Jul 07 2021 at 20:26)</a>:</h4>
<p>I just want to mention that someone is asking in <a href="https://github.com/rust-lang/rust/issues/80804">#80804</a> which version of Rust this will be available in. A backport to beta may be worth considering, though that's not my call.</p>



<a name="245266664"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245266664" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245266664">(Jul 08 2021 at 02:38)</a>:</h4>
<p>This failed in a rollup.</p>



<a name="245266672"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245266672" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245266672">(Jul 08 2021 at 02:38)</a>:</h4>
<p>Platform specific imports. I'd imported something on a platform it shouldn't have been on.</p>



<a name="245266763"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245266763" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245266763">(Jul 08 2021 at 02:40)</a>:</h4>
<p>I've fixed that problem, but it's very hard to me to tell if there will be more. I've cross compiled it locally to see if I could find any problems, and I haven't, but I also can't cross compile it for every system.</p>



<a name="245266769"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245266769" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245266769">(Jul 08 2021 at 02:40)</a>:</h4>
<p><del>Could I maybe get someone to run a <code>try</code> for me?</del> Edit: Nevermind, someone had another suggestion.</p>



<a name="245266833"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245266833" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245266833">(Jul 08 2021 at 02:42)</a>:</h4>
<p>I was just talking about this problem with someone in <a class="stream" data-stream-id="122651" href="/#narrow/stream/122651-general">#general</a>, incidentally. Nothing particularly interesting, but the <a href="#narrow/stream/122651-general/topic/Lengthy.20bors.20runs/near/245262622">discussion starts here</a> if you want to backread.</p>



<a name="245276098"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245276098" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245276098">(Jul 08 2021 at 06:22)</a>:</h4>
<p>Yeah, I think the best thing to do is probably either run <code>try</code> and fix problems until it works or `r+ rollup=never" it. I tested it on all the platforms I could figure out how to cross compile to. There may be problems on another platform or two, but it can't be that many tries until we catch all of them.</p>



<a name="245276256"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245276256" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245276256">(Jul 08 2021 at 06:25)</a>:</h4>
<p>I could try another approach? I could maybe just <code>#[allow(unused_imports)]</code> and not worry about the platforms? I'm worried that I'd end up messing things up in some other way, but that may be irrational. Let me know if you'd prefer that.</p>



<a name="245276326"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245276326" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245276326">(Jul 08 2021 at 06:26)</a>:</h4>
<p>I'm very sorry for all the trouble.</p>



<a name="245278036"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245278036" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245278036">(Jul 08 2021 at 06:58)</a>:</h4>
<blockquote>
<p>#[allow(unused_imports)]</p>
</blockquote>
<p>That's discouraged, but you could do a <code>#[cfg_attr(not(osx), allow(unusued_imports))]</code> (paraphrasing). Or move the imports into the function itself.</p>



<a name="245278397"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245278397" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245278397">(Jul 08 2021 at 07:02)</a>:</h4>
<p>As a side note, it's possible for someone to delegate bors access to you for one issue, which would let you try repeatedly on that issue.</p>



<a name="245278441"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245278441" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245278441">(Jul 08 2021 at 07:03)</a>:</h4>
<p>Also, yeah, you don't really want to use unused imports. Even though it means more work, we do prefer cfg directives on each item.</p>



<a name="245279084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245279084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245279084">(Jul 08 2021 at 07:12)</a>:</h4>
<p>I honestly figured you wouldn't trust me enough delegate for the PR. I am pretty new and all.</p>



<a name="245279338"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245279338" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245279338">(Jul 08 2021 at 07:14)</a>:</h4>
<p>If I were on an evil quest to destroy the rust project (I'm not), I could conceivably do some damage with it.</p>



<a name="245279698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245279698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245279698">(Jul 08 2021 at 07:19)</a>:</h4>
<p>Of course, if you do decide to delegate to me, I'll be sure to be especially trustworthy. :)</p>



<a name="245359879"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245359879" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245359879">(Jul 08 2021 at 19:28)</a>:</h4>
<p>Okay, the try worked.</p>



<a name="245360065"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245360065" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245360065">(Jul 08 2021 at 19:30)</a>:</h4>
<p>I'm not sure that's very meaningful though. I had gotten the impression that try ran it on all the platforms, but it's seeming like that might not be the case?</p>



<a name="245360355"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245360355" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245360355">(Jul 08 2021 at 19:32)</a>:</h4>
<p>If I'm reading <a href="https://github.com/rust-lang/rust/blob/master/.github/workflows/ci.yml#L528-L532">this</a> right, try runs only on <code>x86_64-linux</code>, as opposed to a real run, which runs on <a href="https://github.com/rust-lang/rust/blob/master/.github/workflows/ci.yml#L157-L422">everything under the sun</a>.</p>



<a name="245360443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245360443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245360443">(Jul 08 2021 at 19:32)</a>:</h4>
<p>I'm kind of hoping I'm reading it wrong.</p>



<a name="245360711"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245360711" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245360711">(Jul 08 2021 at 19:35)</a>:</h4>
<p>If I did request something unhelpful, I apologize.</p>



<a name="245360948"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245360948" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245360948">(Jul 08 2021 at 19:37)</a>:</h4>
<p>In either case, the next step would be to run a a real <code>r+</code>. I can do that now that it's delegated, but I won't until someone gives me the go-ahead. I might suggest <code>rollup=never</code> if the try might not have covered everything.</p>



<a name="245361171"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245361171" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245361171">(Jul 08 2021 at 19:39)</a>:</h4>
<p>Well, if nothing else comes about this, I'm going to come out of it with a lot better understanding of how the CI works. :)</p>



<a name="245370917"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245370917" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245370917">(Jul 08 2021 at 20:55)</a>:</h4>
<p>You mean you need need someone to r+ proper use of delegated r+? :P</p>
<p>More seriously, you <em>could</em> modify the CI script to test the platforms you want. But at that seems like overkill just to test a few lines of <code>cfg</code>s to shut up linters. So just using the delegated rights you have been given seems fairly safe. Afaik you should use <code>r=joshtripplet</code> though so bors records him as original approver.</p>



<a name="245371789"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245371789" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245371789">(Jul 08 2021 at 21:02)</a>:</h4>
<p>Will do! Thanks for the reminder!</p>



<a name="245388537"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245388537" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245388537">(Jul 09 2021 at 00:40)</a>:</h4>
<p>It failed again, though it got a lot closer to finishing this time.</p>



<a name="245388562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245388562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245388562">(Jul 09 2021 at 00:41)</a>:</h4>
<p>Temporarily rejiggering the try config is looking increasingly tempting. It's faster and it doesn't block the queue.</p>



<a name="245388610"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245388610" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245388610">(Jul 09 2021 at 00:42)</a>:</h4>
<p>It is a bit silly for such a small change though.</p>



<a name="245388662"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245388662" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245388662">(Jul 09 2021 at 00:43)</a>:</h4>
<p>Will I bother anyone if I do it that way?</p>



<a name="245388703"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245388703" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245388703">(Jul 09 2021 at 00:44)</a>:</h4>
<p>I'd undo it fully before the final version, of course.</p>



<a name="245388837"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245388837" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Yu [they/she] <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245388837">(Jul 09 2021 at 00:46)</a>:</h4>
<p>my guess is you might want to <code>r-</code> the PR before you do that, so the modified CI config won't get accidentally merged?</p>



<a name="245388992"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245388992" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245388992">(Jul 09 2021 at 00:49)</a>:</h4>
<p>I would, yeah.</p>



<a name="245389010"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389010" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389010">(Jul 09 2021 at 00:49)</a>:</h4>
<p>I'm going for it. I'll post an explanatory comment in thread.</p>



<a name="245389020"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389020" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389020">(Jul 09 2021 at 00:50)</a>:</h4>
<p>It's fine to add one or two builders to the PR matrix, just don't add all 60.</p>



<a name="245389077"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389077" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389077">(Jul 09 2021 at 00:50)</a>:</h4>
<p>Definitely r- first. :)</p>



<a name="245389084"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389084" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389084">(Jul 09 2021 at 00:50)</a>:</h4>
<p><span class="user-mention" data-user-id="417924">@inquisitivecrystal</span> Just wanted to reassure you that you're doing it right. :)</p>



<a name="245389101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389101">(Jul 09 2021 at 00:50)</a>:</h4>
<p>It's definitely intimidating to Invoke Ye Olde CI Machinery the first few times.</p>



<a name="245389118"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389118" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389118">(Jul 09 2021 at 00:51)</a>:</h4>
<p>And you will end up breaking a rollup at some point, but that happens, and nobody's going to bite your head off about it. :)</p>



<a name="245389230"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389230" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389230">(Jul 09 2021 at 00:53)</a>:</h4>
<p><span class="user-mention silent" data-user-id="120518">Eric Huss</span> <a href="#narrow/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link/near/245389020">said</a>:</p>
<blockquote>
<p>It's fine to add one or two builders to the PR matrix, just don't add all 60.</p>
</blockquote>
<p>Why not?</p>



<a name="245389314"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389314" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389314">(Jul 09 2021 at 00:54)</a>:</h4>
<p>We have limited CI capacity, once it hits the cap it would block all other builders.</p>



<a name="245389360"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389360" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389360">(Jul 09 2021 at 00:55)</a>:</h4>
<p>Alright. So, if I need to run this against all unix systems, you're saying it's better to do that via <code>r=</code> than <code>try</code>?</p>



<a name="245389365"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389365" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389365">(Jul 09 2021 at 00:55)</a>:</h4>
<p>Also, in practice, a couple of additional platforms gives you the test matrix you need. In this case, you need some macOS platforms.</p>



<a name="245389385"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389385" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389385">(Jul 09 2021 at 00:56)</a>:</h4>
<p>Do the platforms run in order?</p>



<a name="245389427"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389427" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389427">(Jul 09 2021 at 00:56)</a>:</h4>
<p>They run somewhat in parallel.</p>



<a name="245389444"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389444" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389444">(Jul 09 2021 at 00:56)</a>:</h4>
<p>Alright.</p>



<a name="245389445"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389445" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389445">(Jul 09 2021 at 00:56)</a>:</h4>
<p><span class="user-mention" data-user-id="417924">@inquisitivecrystal</span> If you genuinely needed "all unix systems" that'd be a different matter, but most of the time you need a subset to get an idea. Once a subset passes, it's reasonable to start throwing it at r+ to see about merging it.</p>



<a name="245389458"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389458" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389458">(Jul 09 2021 at 00:57)</a>:</h4>
<p>Looking at the last run, it looks like almost all the Unix jobs finished.</p>



<a name="245389466"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389466" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Eric Huss <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389466">(Jul 09 2021 at 00:57)</a>:</h4>
<p>It was just the macos one that failed.</p>



<a name="245389477"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389477" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Yu [they/she] <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389477">(Jul 09 2021 at 00:57)</a>:</h4>
<p>if it were me, i'd add a few likely-to-break platforms, see if they pass under <code>try</code>, then revert the CI change and do the full run with an <code>r+</code> and see what else breaks. but i'm not a team member, so you shouldn't take my word for it :)</p>



<a name="245389544"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389544" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389544">(Jul 09 2021 at 00:58)</a>:</h4>
<p>Alrighty!</p>



<a name="245389562"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389562" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Taylor Yu [they/she] <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389562">(Jul 09 2021 at 00:58)</a>:</h4>
<p>(oops, looks like i basically said what Josh said)</p>



<a name="245389678"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389678" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389678">(Jul 09 2021 at 01:00)</a>:</h4>
<p>Josh, thank you for the reassurance a bit earlier. This process is pretty confusing and a bit scary scary the first time through it, and I really appreciate all the advice and support.</p>



<a name="245389713"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389713" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389713">(Jul 09 2021 at 01:00)</a>:</h4>
<p>Thank you everyone else for you advice as well.</p>



<a name="245389811"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245389811" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245389811">(Jul 09 2021 at 01:02)</a>:</h4>
<p>Rust has been the most friendly open source project I've gotten to contribute to, and I appreciate everyone for helping to make it that way. <span aria-label="heart" class="emoji emoji-2764" role="img" title="heart">:heart:</span></p>



<a name="245404810"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245404810" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245404810">(Jul 09 2021 at 06:09)</a>:</h4>
<p>Okay, the try finally passed!</p>



<a name="245404932"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245404932" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245404932">(Jul 09 2021 at 06:11)</a>:</h4>
<p>Commit etiquette question: is it better to leave a seperate commit with the changes I did to make the build work, or merge them in where they logically belong? I'm inclined to do the later, since there aren't really any substantive changes for a reviewer to look at.</p>



<a name="245419240"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245419240" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245419240">(Jul 09 2021 at 09:10)</a>:</h4>
<p>I think I'll keep them as a separate commit, just because that's probably less controversial. I'll finish things up tomorrow.</p>



<a name="245463993"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245463993" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245463993">(Jul 09 2021 at 16:19)</a>:</h4>
<p><span class="user-mention" data-user-id="417924">@inquisitivecrystal</span> Merging them into the relevant commit is ideal, but not required. Rust doesn't have a hard requirement that every single commit builds and passes tests, the way some projects do.</p>



<a name="245464076"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245464076" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Josh Triplett <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245464076">(Jul 09 2021 at 16:20)</a>:</h4>
<p>When people bisect Rust, they commonly bisect merges only, not every commit.</p>



<a name="245532589"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245532589" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245532589">(Jul 10 2021 at 06:14)</a>:</h4>
<p>Alright, I'll do that then!</p>



<a name="245532734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245532734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245532734">(Jul 10 2021 at 06:18)</a>:</h4>
<p>I also have some good news. <a href="https://github.com/rust-lang/rust/issues/86968">#86968</a>, another news of mine, was merged. It fixes the bug that required adding that empty documentation.  I can remove those horrible<code>#[doc = ""]</code>attributes now.</p>



<a name="245532751"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245532751" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245532751">(Jul 10 2021 at 06:19)</a>:</h4>
<p>I'm glad. I never felt great about those.</p>



<a name="245532889"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245532889" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245532889">(Jul 10 2021 at 06:22)</a>:</h4>
<p>I've rebased onto master, stripping out those attributes and merging the commits together sensibly. I've also gotten rid of those temporary changes to the CI.</p>



<a name="245532890"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245532890" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245532890">(Jul 10 2021 at 06:22)</a>:</h4>
<p>It probably sounds like a lot, but none of it is substantive.</p>



<a name="245533690"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245533690" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245533690">(Jul 10 2021 at 06:45)</a>:</h4>
<p>And... the documentation thing doesn't seem to be working.</p>



<a name="245533694"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245533694" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245533694">(Jul 10 2021 at 06:45)</a>:</h4>
<p><em>sighs deeply</em></p>



<a name="245533695"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245533695" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245533695">(Jul 10 2021 at 06:45)</a>:</h4>
<p>I wrote tests.</p>



<a name="245533698"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245533698" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245533698">(Jul 10 2021 at 06:45)</a>:</h4>
<p>Oh!</p>



<a name="245533700"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245533700" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245533700">(Jul 10 2021 at 06:45)</a>:</h4>
<p>Bootstrapping!</p>



<a name="245533752"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245533752" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245533752">(Jul 10 2021 at 06:46)</a>:</h4>
<p>They need to stay in till the next release cycle. Alright.</p>



<a name="245533772"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245533772" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245533772">(Jul 10 2021 at 06:47)</a>:</h4>
<p>you can put a <code>#![cfg_attr(bootstrap, ...)]</code> on it</p>



<a name="245533820"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245533820" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245533820">(Jul 10 2021 at 06:48)</a>:</h4>
<p>Not much point. It's a hack, but that if anything makes it more messy.</p>



<a name="245533834"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245533834" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245533834">(Jul 10 2021 at 06:48)</a>:</h4>
<p>it lets people know that something can be removed later</p>



<a name="245533904"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245533904" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245533904">(Jul 10 2021 at 06:50)</a>:</h4>
<p>I can yank it later myself, but if you really think it's a good idea I can do it?</p>



<a name="245533907"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245533907" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245533907">(Jul 10 2021 at 06:50)</a>:</h4>
<p>May as well at least test it to see that it works...</p>



<a name="245534087"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245534087" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245534087">(Jul 10 2021 at 06:54)</a>:</h4>
<p>Ahh well, if it's the best practice I should just do it.</p>



<a name="245534404"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245534404" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> isHavvy <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245534404">(Jul 10 2021 at 07:03)</a>:</h4>
<p>It removes <em>your memory</em> as a dependency.</p>



<a name="245534472"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245534472" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245534472">(Jul 10 2021 at 07:05)</a>:</h4>
<p>What, you're not comfortable with the fate of the Rust project depending solely on my memory? ;)</p>



<a name="245534476"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245534476" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245534476">(Jul 10 2021 at 07:05)</a>:</h4>
<p>Also, consider it done.</p>



<a name="245534734"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245534734" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> The 8472 <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245534734">(Jul 10 2021 at 07:11)</a>:</h4>
<p>What if the League of Unsafe Programming Languages sends an assassin?</p>



<a name="245534792"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245534792" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245534792">(Jul 10 2021 at 07:12)</a>:</h4>
<p>You're right. This is a safety issue.</p>



<a name="245534799"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245534799" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245534799">(Jul 10 2021 at 07:12)</a>:</h4>
<p>Specifically, my safety from assasins.</p>



<a name="245535945"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245535945" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245535945">(Jul 10 2021 at 07:39)</a>:</h4>
<p>Alright, rebasing and editing complete, and I've force pushed.</p>



<a name="245536040"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245536040" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245536040">(Jul 10 2021 at 07:42)</a>:</h4>
<p>I'll <code>r=</code> in a bit.</p>



<a name="245537366"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245537366" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245537366">(Jul 10 2021 at 08:15)</a>:</h4>
<p><code>r=</code>ed. Fingers crossed it actually builds this time.</p>



<a name="245537443"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245537443" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245537443">(Jul 10 2021 at 08:16)</a>:</h4>
<p>I just realized that, if this is backported, it's going to need the <code>doc</code> attribute added unconditionally. But if the libs team approves a backport, I can deal with that then.</p>



<a name="245537522"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245537522" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245537522">(Jul 10 2021 at 08:19)</a>:</h4>
<p>It would probably be best to  edit it to drop some of the nonessential changes anyway, to minimize the amount of code that's being backported and thus minimizw the possibility of problems. Easy enough to do this at the same time.</p>



<a name="245537649"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/219381-t-libs/topic/Using%20weak%21%20in%20fs%3A%3Ahard_link/near/245537649" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> inquisitivecrystal <a href="https://rust-lang.github.io/zulip_archive/stream/219381-t-libs/topic/Using.20weak!.20in.20fs.3A.3Ahard_link.html#245537649">(Jul 10 2021 at 08:22)</a>:</h4>
<p>Actually, now that I think about it, the change to <code>weak!</code> is in itself nonessential. One would probably just drop that, making the whole issue irrelevant.</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>